package com.bigknow.appstore.web.base.entity;

import com.bigknow.appstore.web.framework.entity.QueryField;
import com.bigknow.appstore.web.framework.entity.BaseEntity;
import com.bigknow.appstore.web.framework.entity.IEntity;
import com.bigknow.appstore.web.base.entity.enums.State;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Transient;

import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;

@XmlRootElement
@Entity("web.base.role")
public class Role extends BaseEntity implements IEntity {
    @QueryField
    private String name;
    @QueryField
    private String code;
    @QueryField
    private String remark;
    private State state;
    private String permissionIds;
    @Transient
    private List<Permission> permissions;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public State getState() {
        return state;
    }

    public void setState(State state) {
        this.state = state;
    }

    public String getPermissionIds() {
        return permissionIds;
    }

    public void setPermissionIds(String permissionIds) {
        this.permissionIds = permissionIds;
    }

    public List<Permission> getPermissions() {
        return permissions;
    }

    public void setPermissions(List<Permission> permissions) {
        this.permissions = permissions;
    }
}

	
